package com.ruoyi.labour.enums;

public enum CustomerPhoneStatus {

    UN_USED(0, "未使用"),
    USED(1, "使用");

    private final Integer code;
    private final String info;

    CustomerPhoneStatus(Integer code, String info) {
        this.code = code;
        this.info = info;
    }

    public static String parse(final Integer codes) {
        for (final CustomerPhoneStatus item : CustomerPhoneStatus.values()) {
            if (item.getCode().equals(codes)) {
                return item.getInfo();
            }
        }
        return null;
    }

    public Integer getCode() {
        return code;
    }

    public String getInfo() {
        return info;
    }
}
